package cn.edu.sjtu.se.dslab.service.achieve;

import cn.edu.sjtu.se.dslab.DAO.IMethodComponentDAO;
import cn.edu.sjtu.se.dslab.actionbean.EditUserActionBean;
import cn.edu.sjtu.se.dslab.actionbean.PageBean;
import cn.edu.sjtu.se.dslab.actionbean.UserActionBean;
import cn.edu.sjtu.se.dslab.exception.DBException;
import cn.edu.sjtu.se.dslab.service.IMethodComponentService;

public class MethodComponentService implements IMethodComponentService {

	private IMethodComponentDAO methodComponentDAO;

	public IMethodComponentDAO getMethodComponentDAO() {
		return methodComponentDAO;
	}

	public void setMethodComponentDAO(IMethodComponentDAO methodComponentDAO) {
		this.methodComponentDAO = methodComponentDAO;
	}

	@Override
	public void add(EditUserActionBean addUserActionBean) throws DBException {
		// TODO Auto-generated method stub
		// 定义表对象
//		User bean = new User();
//
//		// 设置系统用户登录名
//		bean.setUsername(addUserActionBean.getTxtUsername());
//		// 初始密码设为：Const.PASSWORD
//		bean.setPassword(Const.PASSWORD);
//		userDao.save(bean);
	}

	@Override
	public PageBean getUserList(UserActionBean userManaActionBean)
			throws DBException {
		// TODO Auto-generated method stub
		// 获取查询语句
//		String hql = methodComponentDAO.getAllHql();
//		// 查询分页并返回
//		PageBean pageBean = methodComponentDAO.findByHqlPage(
//				sysUserManaActionBean.getPageNum(), hql);
//		// 返回分页结果
//		return pageBean;
		return null;
	}

}
